package com.bw.documents.manager.adapter



import com.bawei.module_documents.R
import com.blankj.utilcode.util.TimeUtils
import com.bw.documents.manager.entity.DocumentsEntity
import com.bw.quickadapter.BaseQuickAdapter
import com.bw.quickadapter.BaseViewHolder

class DocumentsAdapter : BaseQuickAdapter<DocumentsEntity>(R.layout.item_documents) {

    init {
        addItemChildClick(R.id.documents_delete_layout,R.id.documents_group)
    }

    override fun convert(holder: BaseViewHolder?, item: DocumentsEntity?) {
        holder!!.let {
            it.setImage(R.id.documents_img,com.bawei.library_base.R.drawable.icon3)
            it.setText(R.id.documents_name_tv,item!!.fileName)
            it.setText(R.id.documents_time_tv, TimeUtils.millis2String(item.fileTime*1000))
        }
    }
}